package com.rojored.layouts.box2DLayoutClasses
{

import Box2DAS.Dynamics.b2World;

/**
 *  Contract for Box2DLayout element physics correlate.
 */
public interface IPhyicsCorrelate
{

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------------------
    //  centerX
    //--------------------------------------

    /**
     *  Element center position on the x axis.
     */
    function get centerX():Number;

    //--------------------------------------
    //  centerY
    //--------------------------------------

    /**
     *  Element center position on the y axis.
     */
    function get centerY():Number;

    //--------------------------------------
    //  angle
    //--------------------------------------

    /**
     *  Element angle in radians.
     */
    function get angle():Number;

    /**
     *  @private
     */
    function set angle(value:Number):void;

    //--------------------------------------
    //  width
    //--------------------------------------

    /**
     *  Element width.
     */
    function get width():Number;

    //--------------------------------------
    //  height
    //--------------------------------------

    /**
     *  Element height.
     */
    function get height():Number;

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     *  Initialzie the correlate.
     *
     *  @param Box2D world on which the correlate must be created.
     *  @param Box2D exclusion index for ignoring internal collisions if
     *  necessary.
     */
    function initialize(world:b2World,
                        groupIndex:int, centerX:Number,
                        centerY:Number,
                        angle:Number,
                        width:Number,
                        height:Number):void;
    /**
     *  Remove and cleanup correlate.
     */
    function destroy():void;

    /**
     *  Update the correlate size.
     */
    function setSize(width:Number, height:Number):void;

    /**
     *  Update the correlate position manually.
     */
    function setPosition(centerX:Number, centerY:Number, angle:Number):void;
}
}
